import 'package:flutter/material.dart';
import 'package:flutter_chubao/tools/app_image_load.dart';
import 'package:flutter_chubao/tools/app_textstyle.dart';

class AppWidgetTitle extends StatelessWidget {
  final String title;
  final String imgPath;
  AppWidgetTitle({required this.title, this.imgPath = 'icon_title_bg_unit'});
  @override
  Widget build(BuildContext context) {
    return Container(
      height: 25,
      decoration: BoxDecoration(
          image: DecorationImage(
              alignment: Alignment.bottomCenter,
              fit: BoxFit.fitWidth,
              image: AppImage.getAssetImage(imgPath))),
      child: Text(
        title,
        style: AppTextStyle.getBoldTextStyle(
          fontSize: 16,
        ),
      ),
    );
  }
}
